<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Javascript tests</title>
    <link rel="stylesheet" href="qunit.css">
</head>

<body>
    <div id="qunit"></div>
    <div id="qunit-fixture">
        <form>
            <input name="text" />
            <div class="has-error">Error text</div>
        </form>
    </div>
    <script src="http://code.jquery.com/jquery.min.js"></script>
    <script src="qunit.js"></script>
    <script src="../list.js"></script>
    <script>
    test("errors should be hidden on keypress", function() {
        $('input').trigger('keypress');
        equal($('.has-error').is(':visible'), false);
    });
    test("errors not be hidden unless there is a keypress", function() {
        equal($('.has-error').is(':visible'), true);
    });
    </script>
</body>

</html>
